﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using LY.Interface;
using LY.Entity;
using LY.Entity.SearchEntity;
using LY.Entity.PageSearch;
using LY.Entity.Jsons;
namespace QJ.CMS.Areas.Admin.Controllers
{
    public class BankCardController : Controller
    {
        //
        // GET: /Admin/BankCard/
        //银行卡绑定信息列表
        public static IBankCardService _Bank;

        public BankCardController(IBankCardService bank)
        {
            _Bank = bank;
        }

        public ActionResult Bankcardllist(int id)
        {
            ViewBag.Mid = id;
            
            return View();
        }
        [HttpPost]
        public ActionResult BankcardList(BankCardSearch search, FormCollection form)
        {
            PageView view = new PageView(form);
            string colkey = form["colkey"];
            string colsinfo = form["colsinfo"];
            PagedList<U_BankCard> bList = _Bank.Getbank(search.MemberID, view);
            JsonQTable at = JsonQTable.ConvertFromPagedList<U_BankCard>(bList, colkey, colsinfo.Split(','));
            return Json(at);
        }


    }
}
